<?php

namespace app\admin\validate;

use think\Validate;
use app\common\Error;

class Login extends Validate
{
    protected $rule = [
        'username' => 'require',
        'password' => 'require',
    ];

    protected $message = [
        'username.require' => Error::USERNAME_NOT_EXIXTS,
        'password.require' => Error::PASSWORD_NOT_EXIXTS,
    ];

    protected $scene = [
        'login' => ['username', 'password'],
        'register' => ['username', 'password'],
    ];
}